/**
 * 
 */
package com.wolfware.athsweb.persistancy.springhibernate;

import java.util.List;

import com.wolfware.athsweb.domain.Club;
import com.wolfware.athsweb.persistancy.dao.ClubDAO;

/**
 * Implementation of ClubDAO.
 * 
 * @see ClubDAO
 * @author ChristianStrzadala
 */
public class SpringHibernateClubDAOImpl extends AbstractSpringHibernateGenericDAOImpl<Long, Club> implements ClubDAO {

	public SpringHibernateClubDAOImpl(){
		super(Club.class);
	}
	
	/**
	 * {@inheritDoc}
	 */
	public void saveClubEntries(List<Club> clubList) {
        for (Club club : clubList) {
            create(club);
        }
	}

	/**
	 * {@inheritDoc}
	 */
	public void saveClubEntry(Club club) {
		create(club);
	}

	/**
	 * {@inheritDoc}
	 */
	public List<Club> getAllClubs() {
		return findAll();
	}

	/**
	 * {@inheritDoc}
	 */
	public Club getClubById(Long id) {
		return read(id);
	}
}